<template>
  <div>
    <h3>前后端交互体验</h3>
    {{categoryData}}
    <ul v-if="categoryData!=undefined">
      <li v-for="item in categoryData.data" :key="item.id">
        {{item.id}}-{{item.name}}
      </li>
    </ul>
  </div>
</template>

<script>
import axios from 'axios'
export default {
  data() {
    return {
      categoryData: undefined
    }
  },
  created() {
    axios.post('/api/bill/category/listCategory', {
    tallyType: 20
})
  .then((response)=>{
	console.log(response)
  this.categoryData = response.data
})
  .catch((error)=>{
	console.log(error);
});
  }
,  methods: {
  }
}
</script>

<style>

</style>